package com.example.uaa.mapper;

import com.example.uaa.model.User;
import org.apache.ibatis.annotations.*;

import java.util.Optional;
import java.util.Set;

@Mapper
public interface UserMapper {

    Optional<User> findByUsername(String username);

    Set<String> findRolesByUserId(Long userId);

    void save(User user);

    void saveUserRole(@Param("userId") Long userId, @Param("role") String role);
}
